<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"  
                xmlns:h="http://java.sun.com/jsf/html"  
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:c="http://java.sun.com/jstl/core"
                template="./../templates/StaffTemplate.xhtml">


    <ui:define name="nav_menu">
        <p:menubar model="#{staffVerifyStakeholderAcctManagedBean.staffMenuModel}"/>
    </ui:define>

    <ui:define name="content">
        <h:form>
            <f:view beforePhase="#{staffVerifyStakeholderAcctManagedBean.initView}" >
                <p:panel id="staffVerifyStakeholderAcctPanel">
                    <p:dataTable var="StakeholderEntity" value="#{staffVerifyStakeholderAcctManagedBean.accountList}" paginator="true" rows="10" selectionMode="single">  
                        <f:facet name="header">  
                            List of Accounts 
                        </f:facet>  
                        <p:column sortBy="#{StakeholderEntity.corpName}" filterBy="#{StakeholderEntity.corpName}">  
                            <f:facet name="header">  
                                <h:outputText value="Company Name" />  
                            </f:facet>  
                            <h:outputText value="#{StakeholderEntity.corpName}" />  
                        </p:column>  
                        <p:column sortBy="#{StakeholderEntity.bizRegNumber}" filterBy="#{StakeholderEntity.bizRegNumber}">  
                            <f:facet name="header">  
                                <h:outputText value="Business Register Number" />  
                            </f:facet>  
                            <h:outputText value="#{StakeholderEntity.bizRegNumber}" />  
                        </p:column>  
                        <p:column sortBy="#{StakeholderEntity.corpContactNumber}" filterBy="#{StakeholderEntity.corpContactNumber}">  
                            <f:facet name="header">  
                                <h:outputText value="Business Contact Number" />  
                            </f:facet>  
                            <h:outputText value="#{StakeholderEntity.corpContactNumber}" />  
                        </p:column>
                        <p:column sortBy="#{StakeholderEntity.corpContactPerson}" filterBy="#{StakeholderEntity.corpContactPerson}">  
                            <f:facet name="header">  
                                <h:outputText value="Business Contact Person" />  
                            </f:facet>  
                            <h:outputText value="#{StakeholderEntity.corpContactPerson}" />  
                        </p:column>
                        <p:column> 
                            <p:cellEditor>
                                <f:facet name="header">  
                                    <h:outputText value="Activation Status" />  
                                </f:facet>  
                                <f:facet name="input">  
                                    <h:selectBooleanCheckbox value="#{StakeholderEntity.activate}" />
                                </f:facet>
                                <f:facet name="output">  
                                    <h:outputText value="#{StakeholderEntity.activate}" />
                                </f:facet>
                            </p:cellEditor>
                        </p:column>  
                        <p:column headerText="Edit">  
                            <p:rowEditor />  
                        </p:column>  
                    </p:dataTable>
                </p:panel>
                <p:commandButton id="btnConfirm" actionListener="#{staffVerifyStakeholderAcctManagedBean.confirmChanges}" value="Save Changes" update="staffVerifyStakeholderAcctPanel" ajax="true"/>
            </f:view>
        </h:form>
    </ui:define>

</ui:composition>
